package com.galaxy.commom.base.enums;

/**
 * 结果码枚举类
 * @author caijinbang
 * @date 2018/9/7 20:31
 */
public enum ResultCodeEnum {

  /**
   * 成功
   */
  SUCCESS(200, "成功"),
  INTERNAL_SERVER_ERROR(500, "服务器出错"),
  BAD_REQUEST(400, "请求参数出错"),
  NO_SUPPORTED_MEDIATYPE(415, "不支持的媒体类型,请使用application/json;charset=UTF-8"),
  LOGIN_FAIL(303, "登录失败"),
  LOGIN_FAIL_ACCOUNT_LOCKED(304, "用户被锁定"),
  LOGIN_FAIL_ACCOUNT_DISABLED(305, "用户未启用"),
  LOGIN_FAIL_ACCOUNT_EXPIRED(306, "用户过期"),
  LOGIN_FAIL_ACCOUNT_UNKNOWN(307, "不存在该用户"),
  LOGIN_FAIL_INCORRECT_CREDENTIALS(308, "密码不正确"),
  LOGIN_FAIL_CAPTCHA_ERROR(309, "验证码错误"),
  UNLOGIN(401, "没有登录"),
  UNAUTHORIZED(403, "没有权限"),
  DATA_DUPLICATE_KEY(601, "数据重复"),
  NOT_FOUND_CONSUMESERVICE(70001,"找不到消费者处理服务"),
  HANDLE_RESULT_NULL(70002,"处理信息为空"),
  CONSUME_FAIL(70003,"消费处理失败"),
  PARAM_NULL(70004,"初始化参数为空")
  ;



  private  int value;
  private  String message;

  ResultCodeEnum(int value, String message) {
    this.value = value;
    this.message = message;
  }

  public int getValue() {
    return value;
  }

  public void setValue(int value) {
    this.value = value;
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }
}
